reversed test sequence for GTK_WIDGET_CAN_FOCUS and GTK_IS_CONTAINER
authorLars Hamann <lars@src.gnome.org>
Tue, 2 Jun 1998 19:32:33 +0000 (19:32 +0000)
committerLars Hamann <lars@src.gnome.org>
Tue, 2 Jun 1998 19:32:33 +0000 (19:32 +0000)
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkcontainer.c
gtk/gtknotebook.c

index 4e5a9599295e1e7e4f6601f966e513b61e5cc25a..1503c8a478002e1b9d7c594880084a2a6c348a4c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Jun  2 20:04:45 1998  Lars Hamann  <lars@gtk.org>
+
+       * gtk/gtknotebook.c (gtk_notebook_page_select) (gtk_notebook_focus)
+       * gtk/gtkcontainer.c (gtk_container_focus_move):
+       reversed test sequence for GTK_WIDGET_CAN_FOCUS and GTK_IS_CONTAINER
+
 Tue Jun  2 13:04:06 BST 1998  Tony Gale  <gale@gtk.org>
 
        * docs/gtk_tut.sgml: minor changes to support auto
index 4e5a9599295e1e7e4f6601f966e513b61e5cc25a..1503c8a478002e1b9d7c594880084a2a6c348a4c 100644 (file)
@@ -1,3 +1,9 @@
+Tue Jun  2 20:04:45 1998  Lars Hamann  <lars@gtk.org>
+
+       * gtk/gtknotebook.c (gtk_notebook_page_select) (gtk_notebook_focus)
+       * gtk/gtkcontainer.c (gtk_container_focus_move):
+       reversed test sequence for GTK_WIDGET_CAN_FOCUS and GTK_IS_CONTAINER
+
 Tue Jun  2 13:04:06 BST 1998  Tony Gale  <gale@gtk.org>
 
        * docs/gtk_tut.sgml: minor changes to support auto
index 4e5a9599295e1e7e4f6601f966e513b61e5cc25a..1503c8a478002e1b9d7c594880084a2a6c348a4c 100644 (file)
@@ -1,3 +1,9 @@
+Tue Jun  2 20:04:45 1998  Lars Hamann  <lars@gtk.org>
+
+       * gtk/gtknotebook.c (gtk_notebook_page_select) (gtk_notebook_focus)
+       * gtk/gtkcontainer.c (gtk_container_focus_move):
+       reversed test sequence for GTK_WIDGET_CAN_FOCUS and GTK_IS_CONTAINER
+
 Tue Jun  2 13:04:06 BST 1998  Tony Gale  <gale@gtk.org>
 
        * docs/gtk_tut.sgml: minor changes to support auto
index 4e5a9599295e1e7e4f6601f966e513b61e5cc25a..1503c8a478002e1b9d7c594880084a2a6c348a4c 100644 (file)
@@ -1,3 +1,9 @@
+Tue Jun  2 20:04:45 1998  Lars Hamann  <lars@gtk.org>
+
+       * gtk/gtknotebook.c (gtk_notebook_page_select) (gtk_notebook_focus)
+       * gtk/gtkcontainer.c (gtk_container_focus_move):
+       reversed test sequence for GTK_WIDGET_CAN_FOCUS and GTK_IS_CONTAINER
+
 Tue Jun  2 13:04:06 BST 1998  Tony Gale  <gale@gtk.org>
 
        * docs/gtk_tut.sgml: minor changes to support auto
index 4e5a9599295e1e7e4f6601f966e513b61e5cc25a..1503c8a478002e1b9d7c594880084a2a6c348a4c 100644 (file)
@@ -1,3 +1,9 @@
+Tue Jun  2 20:04:45 1998  Lars Hamann  <lars@gtk.org>
+
+       * gtk/gtknotebook.c (gtk_notebook_page_select) (gtk_notebook_focus)
+       * gtk/gtkcontainer.c (gtk_container_focus_move):
+       reversed test sequence for GTK_WIDGET_CAN_FOCUS and GTK_IS_CONTAINER
+
 Tue Jun  2 13:04:06 BST 1998  Tony Gale  <gale@gtk.org>
 
        * docs/gtk_tut.sgml: minor changes to support auto
index 4e5a9599295e1e7e4f6601f966e513b61e5cc25a..1503c8a478002e1b9d7c594880084a2a6c348a4c 100644 (file)
@@ -1,3 +1,9 @@
+Tue Jun  2 20:04:45 1998  Lars Hamann  <lars@gtk.org>
+
+       * gtk/gtknotebook.c (gtk_notebook_page_select) (gtk_notebook_focus)
+       * gtk/gtkcontainer.c (gtk_container_focus_move):
+       reversed test sequence for GTK_WIDGET_CAN_FOCUS and GTK_IS_CONTAINER
+
 Tue Jun  2 13:04:06 BST 1998  Tony Gale  <gale@gtk.org>
 
        * docs/gtk_tut.sgml: minor changes to support auto
index 4e5a9599295e1e7e4f6601f966e513b61e5cc25a..1503c8a478002e1b9d7c594880084a2a6c348a4c 100644 (file)
@@ -1,3 +1,9 @@
+Tue Jun  2 20:04:45 1998  Lars Hamann  <lars@gtk.org>
+
+       * gtk/gtknotebook.c (gtk_notebook_page_select) (gtk_notebook_focus)
+       * gtk/gtkcontainer.c (gtk_container_focus_move):
+       reversed test sequence for GTK_WIDGET_CAN_FOCUS and GTK_IS_CONTAINER
+
 Tue Jun  2 13:04:06 BST 1998  Tony Gale  <gale@gtk.org>
 
        * docs/gtk_tut.sgml: minor changes to support auto
index a905b1e69b771a34dc5b1e21600ee96b3b85b48c..4595e7fcad1f7180ad90b972e409ef3f10d7be0f 100644 (file)
@@ -1044,16 +1044,16 @@ gtk_container_focus_move (GtkContainer     *container,
         }
       else if (GTK_WIDGET_VISIBLE (child))
         {
-          if (GTK_WIDGET_CAN_FOCUS (child))
-            {
-              gtk_widget_grab_focus (child);
-              return TRUE;
-            }
-          else if (GTK_IS_CONTAINER (child))
+         if (GTK_IS_CONTAINER (child))
             {
               if (gtk_container_focus (GTK_CONTAINER (child), direction))
                 return TRUE;
             }
+          else if (GTK_WIDGET_CAN_FOCUS (child))
+            {
+              gtk_widget_grab_focus (child);
+              return TRUE;
+            }
         }
     }
 
index b5c19f0cf5745d178caad90883aa3158de4054ec..d4704506d0cf09bcfa4ac6c3b9a68a63959ffe7a 100644 (file)
@@ -2650,7 +2650,13 @@ gtk_notebook_focus (GtkContainer     *container,
     {
       if (GTK_WIDGET_VISIBLE (notebook->cur_page->child))
        {
-         if (GTK_WIDGET_CAN_FOCUS (notebook->cur_page->child))
+         if (GTK_IS_CONTAINER (notebook->cur_page->child))
+           {
+             if (gtk_container_focus 
+                 (GTK_CONTAINER (notebook->cur_page->child), direction))
+               return TRUE;
+           }
+         else if (GTK_WIDGET_CAN_FOCUS (notebook->cur_page->child))
            {
              if (!focus_child)
                {
@@ -2658,12 +2664,6 @@ gtk_notebook_focus (GtkContainer     *container,
                  return TRUE;
                }
            }
-         else if (GTK_IS_CONTAINER (notebook->cur_page->child))
-           {
-             if (gtk_container_focus 
-                 (GTK_CONTAINER (notebook->cur_page->child), direction))
-               return TRUE;
-           }
        }
       return FALSE;
     }
@@ -2759,17 +2759,17 @@ gtk_notebook_page_select (GtkNotebook *notebook)
 
      if (GTK_WIDGET_VISIBLE (page->child))
        {
-        if (GTK_WIDGET_CAN_FOCUS (page->child))
-          {
-            gtk_widget_grab_focus (page->child);
-            return TRUE;
-          }
-        else if (GTK_IS_CONTAINER (page->child))
+        if (GTK_IS_CONTAINER (page->child))
           {
             if (gtk_container_focus (GTK_CONTAINER (page->child), 
                                      GTK_DIR_TAB_FORWARD))
               return TRUE;
           }
+        else if (GTK_WIDGET_CAN_FOCUS (page->child))
+          {
+            gtk_widget_grab_focus (page->child);
+            return TRUE;
+          }
        }
     }
   return FALSE;